package com.blds.mc.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.blds.mc.dao.mapper.McMapper;
import com.blds.mc.entity.Mc;
import com.blds.mc.entity.vo.MediaVo;
import com.blds.mc.service.McService;
import com.blds.mc.service.MediaService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 素材service
 * </p>
 *
 * @author stwyj
 * @since 2018/6/29
 */
@Service
@Slf4j
public class MediaServiceImpl implements MediaService {
    @Resource
    private McMapper mcMapper;

    @Resource
    private McService mcService;

    @Override
    public Page<MediaVo> getMediaList(Integer pageIndex, Integer pageSize) {

        Page<MediaVo> mcList = new Page<MediaVo>(pageIndex, pageSize, "mc.create_time", false);

        return mcList.setRecords(mcMapper.selectMcList(mcList));
    }
}
